package _1480_Running_Sum_of_1d_Array;

import java.util.Arrays;

/**
 * Date: 2021/8/28 20:29
 * Content:
 */
public class Solution {

    public int[] runningSum(int[] nums) {
        for (int i = 1; i < nums.length; i++) nums[i] += nums[i - 1];
        return nums;
    }

    public static void main(String[] args) {

        int[] nums = {1, 2, 3, 4};
        System.out.println(Arrays.toString((new Solution()).runningSum(nums)));
    }
}
